package com.ruoyi.bookstore.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bookstore.mapper.LibraryMapper;
import com.ruoyi.bookstore.domain.Library;
import com.ruoyi.bookstore.service.ILibraryService;

/**
 * 书店Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-20
 */
@Service
public class LibraryServiceImpl implements ILibraryService 
{
    @Autowired
    private LibraryMapper libraryMapper;

    /**
     * 查询书店
     * 
     * @param id 书店主键
     * @return 书店
     */
    @Override
    public Library selectLibraryById(Long id)
    {
        return libraryMapper.selectLibraryById(id);
    }

    /**
     * 查询书店列表
     * 
     * @param library 书店
     * @return 书店
     */
    @Override
    public List<Library> selectLibraryList(Library library)
    {
        return libraryMapper.selectLibraryList(library);
    }

    /**
     * 新增书店
     * 
     * @param library 书店
     * @return 结果
     */
    @Override
    public int insertLibrary(Library library)
    {
        return libraryMapper.insertLibrary(library);
    }

    /**
     * 修改书店
     * 
     * @param library 书店
     * @return 结果
     */
    @Override
    public int updateLibrary(Library library)
    {
        return libraryMapper.updateLibrary(library);
    }

    /**
     * 批量删除书店
     * 
     * @param ids 需要删除的书店主键
     * @return 结果
     */
    @Override
    public int deleteLibraryByIds(Long[] ids)
    {
        return libraryMapper.deleteLibraryByIds(ids);
    }

    /**
     * 删除书店信息
     * 
     * @param id 书店主键
     * @return 结果
     */
    @Override
    public int deleteLibraryById(Long id)
    {
        return libraryMapper.deleteLibraryById(id);
    }
}
